<?php
/**
 * Created by Benjamin.
 * Date: 2020/4/30
 * Time: 16:39
 */
namespace App\Logic;
class Websocket
{
    //一对一请求
    function httpPush($url,array $msgArr){
      $reponse =  go(function ($url,array $msgAr) {
            //实例化
            $client = new \EasySwoole\HttpClient\HttpClient($url);
           return  $client->get();
        });
      return   $reponse;
    }

    //群聊一对多请求
    function httpMulPush($urlArr,array $msgArr){
       foreach ($urlArr as $url){
           $this->httpPush($url,$msgArr);
       }
       return true;
    }

}